<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录页面</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%@include file="../../css.jsp" %>

<style type="text/css">
      * html {
        background-color: #f5f5f5;
      }
      body {
        padding-top: 40px;
        padding-bottom: 40px;
        background-color: #f5f5f5;
      }

      .form-signin {
        max-width: 300px;
        _width:300px;
        padding: 19px 29px 29px;
        margin: 0 auto 20px;
        background-color: #fff;
        border: 1px solid #e5e5e5;
        -webkit-border-radius: 5px;
           -moz-border-radius: 5px;
                border-radius: 5px;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
           -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
                box-shadow: 0 1px 2px rgba(0,0,0,.05);
      }
      .form-signin .form-signin-heading,
      .form-signin .checkbox {
        margin-bottom: 10px;
      }
      .form-signin input[type="text"],
      .form-signin input[type="password"] {
        font-size: 16px;
        height: auto;
        margin-bottom: 15px;
        padding: 7px 9px;
      }
      
label.error {
	margin-left: 10px;
	width: auto;
	display: inline;
	color: red;
    </style>
</head>
<body>
<div class="container">
	<form class="form-signin" action="/user/admin/login" method="post">
        <h2 class="form-signin-heading">请登录</h2>
        <input type="text" class="input-block-level" placeholder="用户名" name="username">
        <input type="password" class="input-block-level" placeholder="密码" name="password">
        <!-- <label class="checkbox">
          <input type="checkbox" value="remember-me"> Remember me
        </label> -->
        <div>
       	 	<button class="btn btn-large btn-primary" type="submit">登录</button>
        </div>
        <c:if test="${not empty error }"><span class="label label-warning">${error}</span></c:if>
      </form>
</div>


<%@include file="../../js.jsp" %>

<script src="${resourceRoot }/third-party/jquery-validation/jquery.validate.min.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
	   $("form").validate({
			rules: {
				username: {required:true,maxlength:30},
				password: {required:true,maxlength:16}
			},
			messages: {
				username: {required:"用户名不能为空",maxlength:"最大为30个字符"},
				password: {required:"密码不能为空",maxlength:"最大为16个字符"}
				}
			});
   });

</script>
</body>
</html>